﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Silverlight.Testing;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ObjectDirectory;

namespace t_ObjectDirectory
{
    [TestClass]
    public class t_ObjectPathManagerTooComplex
    {
        public class Container
        {
            public Container bogus { get; set; }
        }

        [TestMethod]
        [ExpectedException(typeof(ArgumentException))]
        public void TestObjectManagerCircularReferences()
        {
            ///
            /// User has a circular reference, make sure we don't spin out of control!
            /// 

            Container c = new Container();
            c.bogus = c;
            Container c2 = new Container();

            ObjectPathManager mgr = new ObjectPathManager();
            mgr.GetPath(c, c2);
        }
    }
}